/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PasswordSetting.java
 *
 * Created on Oct 29, 2011, 5:38:15 PM
 */
package VIMS;

/**
 *
 * @author shyan
 */
public class PasswordSetting extends javax.swing.JFrame {

    /** Creates new form PasswordSetting */
    public PasswordSetting() {
        super("Password Setting");
        
        initComponents();
        PwAlertMsg.setVisible(false);
        setLocationRelativeTo(null);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLayeredPane1 = new javax.swing.JLayeredPane();
        OldPassword = new javax.swing.JPasswordField();
        NewPassword = new javax.swing.JPasswordField();
        RNewPassword = new javax.swing.JPasswordField();
        OldPwLabel = new javax.swing.JLabel();
        NewPwLabel = new javax.swing.JLabel();
        RNewPwLabel = new javax.swing.JLabel();
        Cancel = new javax.swing.JButton();
        Change = new javax.swing.JButton();
        PwAlertMsg = new javax.swing.JLabel();
        Border = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(400, 300));
        setResizable(false);

        jLayeredPane1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        jLayeredPane1.setMinimumSize(new java.awt.Dimension(400, 300));

        OldPassword.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                OldPasswordActionPerformed(evt);
            }
        });
        OldPassword.setBounds(200, 70, 140, 30);
        jLayeredPane1.add(OldPassword, javax.swing.JLayeredPane.DEFAULT_LAYER);
        NewPassword.setBounds(200, 110, 140, 30);
        jLayeredPane1.add(NewPassword, javax.swing.JLayeredPane.DEFAULT_LAYER);
        RNewPassword.setBounds(200, 150, 140, 30);
        jLayeredPane1.add(RNewPassword, javax.swing.JLayeredPane.DEFAULT_LAYER);

        OldPwLabel.setText("Old Password    :");
        OldPwLabel.setBounds(60, 70, 100, 30);
        jLayeredPane1.add(OldPwLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        NewPwLabel.setText("New Password  :");
        NewPwLabel.setBounds(60, 110, 100, 30);
        jLayeredPane1.add(NewPwLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        RNewPwLabel.setText("Retype New Password  :");
        RNewPwLabel.setBounds(60, 150, 140, 30);
        jLayeredPane1.add(RNewPwLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        Cancel.setText("Cancel");
        Cancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CancelActionPerformed(evt);
            }
        });
        Cancel.setBounds(280, 210, 80, 30);
        jLayeredPane1.add(Cancel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        Change.setText("Change");
        Change.setBounds(190, 210, 80, 30);
        jLayeredPane1.add(Change, javax.swing.JLayeredPane.DEFAULT_LAYER);

        PwAlertMsg.setText("Timeout: YOU ARE REQUIRED TO CHANGE YOUR PW ==");
        PwAlertMsg.setBounds(40, 260, 330, 30);
        jLayeredPane1.add(PwAlertMsg, javax.swing.JLayeredPane.DEFAULT_LAYER);

        Border.setBorder(javax.swing.BorderFactory.createTitledBorder("Change Password"));
        Border.setBounds(30, 30, 340, 170);
        jLayeredPane1.add(Border, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void OldPasswordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OldPasswordActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_OldPasswordActionPerformed

    private void CancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CancelActionPerformed
        this.setVisible(false);
    }//GEN-LAST:event_CancelActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(PasswordSetting.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(PasswordSetting.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(PasswordSetting.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(PasswordSetting.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new PasswordSetting().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel Border;
    private javax.swing.JButton Cancel;
    private javax.swing.JButton Change;
    private javax.swing.JPasswordField NewPassword;
    private javax.swing.JLabel NewPwLabel;
    private javax.swing.JPasswordField OldPassword;
    private javax.swing.JLabel OldPwLabel;
    private javax.swing.JLabel PwAlertMsg;
    private javax.swing.JPasswordField RNewPassword;
    private javax.swing.JLabel RNewPwLabel;
    private javax.swing.JLayeredPane jLayeredPane1;
    // End of variables declaration//GEN-END:variables
}
